<script setup lang="ts">
import { getCommunityList } from '@/api/community';
import type { Community } from '@/api/community/type';
import { onMounted, ref } from 'vue';

const communityList = ref([] as Community[]);
onMounted(() => {
    getCommunityList().then((res) => {
        communityList.value = res.data;
    })
})

const onRemove = () => {

}

</script>

<template>
    <div class="container">
        <el-table :data="communityList" style="width: 100%" stripe border>
            <el-table-column prop="id" label="社区ID" />
            <el-table-column prop="name" label="社区名" />
            <el-table-column prop="title" label="社区主题" />
            <el-table-column prop="url" label="社区头像URL" />
            <el-table-column prop="description" label="社区备注" />
            <el-table-column prop="creator" label="创建者" />
        </el-table>
    </div>
</template>